<template>
  <div>
    <h2>学校信息</h2>
    <h3>名称:{{ school }}</h3>
    <h3>地址:{{ address }}</h3>
    <input type="submit" @click="showSchool" />
  </div>
</template>
<script>
export default {
  data() {
    return {
      school: "北京大学",
      address: "海淀区",
    };
  },
  methods: {
    showSchool() {
      alert(`${this.school},坐落于${this.address}`);
    },
  },
};
</script>
<style></style>
